package stream.Demo09;

import java.io.FileReader;

/**
 * @Author Miku
 * @Create 2021/4/30 9:54
 * 使用FileReader读取文件
 */
public class Test {
    public static void main(String[] args) throws Exception {
        //1.创建FileReader 文件字符输入流
        FileReader fr = new FileReader("e:\\hello.txt");
        //2.读取
        int data = 0;
        while ((data = fr.read()) != -1) {
            System.out.print((char) data);
        }
        //3.关闭
    }
}
